The present disclosure is concerned with the field of data processing.
In a data processing apparatus, numbers can be represented in one of several different formats. For example, the 32-bit integer format uses 32 bits to represent a whole number in binary. A further example is the 64-bit integer format, which uses 64 bits to represent a whole number in binary. The increased number of bits used in the 64-bit format can allow much greater range of values to be represented than may be possible with the 32-bit integer format.
Another example format is a floating-point number. A floating-point number can be used to represent any real number rather than simply any integer. As in the case with integer formats, increasing the number of bits used to represent the floating-point number typically increases the range of values that can be represented. Additionally, increasing the number of bits used to represent a floating-point number may increase the accuracy with which a number can be represented.
Often, in a data processing apparatus, it is desirable to be able to convert from numerous different formats to floating-point formats. For example, if a programmer wishes to add an integer to a fractional number, one approach is for the integer to first be converted to a floating-point number. Alternatively, it may be desirable to increase the number of bits used to represent a floating-point number if more precision is required and in this situation an input floating-point number represented by fewer bits provides the input format.
It would be desirable to allow a direct conversion between multiple different formats, since this may decrease the latency as a consequence of converting to intermediate formats, which would necessitate two or more conversions. However, circuitry that handles multiple direct conversions is typically more complicated, and therefore requires more space, than circuitry that supports few direct conversions. Bigger circuits can lead to bigger devices with higher power consumptions, which can be undesirable in low power devices.